<script src="${rc.getContextPath()}/manage/js/dwzCustomJs/dwz.custom.advancedquery.js?v=${ver}" type="text/javascript"></script>
<#include "/common/pagerForm.html">
<form rel="pagerForm" method="post" action="" class="required-validate" onsubmit="return navTabSearch(this)">
<input type="hidden" id="advancedStatus" name="advancedStatus" value="${condition.advancedStatus!''}" />
<div class="pageHeader">
    <div class="searchBar">
        <ul class="searchContent">
            <li>
            	<label><@label key='andonCode.C,colon'>ANDON编号：</@label></label> 
            	<input type="text" name="andonCode" value="${condition.andonCode!''}"/>
            </li>
            <li>
            	<label><@label key='andonText.C,colon'>ANDON描述：</@label></label> 
            	<input type="text" name="andonText" value="${condition.andonText!''}"/>
            </li>
            <li>
            	<label style="width: 120px;"><@label key='andonTypeCode.C,colon'>ANDON类型：</@label></label> 
            	<select name="andonTypeCode">   
            	   <option value=""><@label key="all.C">所有</@label></option>                 
                   <#if andonTypes??> 
                   		<#list andonTypes as andonType>
	 	     			<option value="${andonType.andonTypeCode!''}" <#if condition.andonTypeCode?? && condition.andonTypeCode == andonType.andonTypeCode> selected</#if>>
	 	     				${andonType.typeText!''}</option> 
			 	   		</#list> 
		 	       </#if>
	    		</select> 
            	
            </li>
        </ul>
        <ul class="searchContent">
            <li>
            	<label><@label key='workCenterCode.C,colon'>工作中心：</@label></label> 
            	<input id="workCenterGrp.workCenterCode" name="workCenterCode" type="text" suggestFields="workCenterCode,workCenterText" postField="workCenterCode" suggestUrl="${rc.getContextPath()}/manage/workCenter/workCenterSuggest" lookupGroup="workCenterGrp" autocomplete="off" value="${condition.workCenterCode!''}" />
            </li>
            <li>
            	<label><@label key='workUnitCode.C,colon'>作业单元：</@label></label> 
            	<input id="workUnitGrp.workUnitCode" name="workUnitCode" type="text" suggestFields="workUnitCode,workUnitText" postField="workUnitCode" suggestUrl="${rc.getContextPath()}/manage/workUnit/workUnitSuggest"  lookupGroup="workUnitGrp" autocomplete="off" value="${condition.workUnitCode!''}" />
            </li>
            <li >
            	<label style="width: 120px;"><@label key='andonRunStatus.C,colon'>ANDON运转状态：</@label></label> 
                <select name="statusECode">
                    <option value="" ><@label key='all.C'>所有</@label></option>
                    <#if andonRunStatus??>
                        <#list andonRunStatus as ecode>
                            <option value="${ecode.eCode!''}" <#if condition.statusECode?? && condition.statusECode == ecode.eCode> selected</#if> >${ecode.eCodeText!''}</option>
                        </#list>
                    </#if>
                </select>
            </li>
            <li class="query">
                <div class="buttonActive">
                    <div class="buttonContent">
                        <button type="submit"><@label key="query.B">查询</@label></button>
                    </div>
                </div>
            </li>
            <li class="advancedQuery" >            
                <a id="advancedQuery"href="javascript:void(0);"   onclick="openAdvanced(navTab.getCurrentPanel())">
                    <@label key="advancedQuery.C">高级查询</@label>
                </a>
                <span  onclick="openAdvanced(navTab.getCurrentPanel());"></span>            
            </li>
        </ul>
    </div>
</div>
<div id="collapsablePanel" style="display:none;" class="pageHeader" >
    <div class="searchBar">
        <ul class="searchContent">
        	<li>
            	<label><@label key='switchOnUser.C,colon'>启动人：</@label></label> 
            	<input type="text" name="switchOnUser" value="${condition.switchOnUser!''}"/>
            </li>
        	<li>
        		<label><@label key='switchOnDateTime.C,from.C,colon'>启动时间从：</@label></label>
            	<input type="text" class="date" dateFmt="yyyy-MM-dd HH:mm:ss" readonly="readonly" size="17" max_Date="{maxSwitchOnDateTime}"  name="minSwitchOnDateTime" value="${condition.minSwitchOnDateTime!''}"/>
            	<a class="inputDateButton" href="javascript:;">选择</a>
            </li>
            <li>
            	<label style="width: 120px;"><@label key="to.C,colon">至：</@label></label>
            	<input type="text" class="date" dateFmt="yyyy-MM-dd HH:mm:ss" readonly="readonly" size="17" min_Date="{minSwitchOnDateTime}" name="maxSwitchOnDateTime"  value="${condition.maxSwitchOnDateTime!''}"/>
            	<a class="inputDateButton" href="javascript:;">选择</a>
            </li> 
        </ul>
        <ul class="searchContent">  
        	<li>
            	<label><@label key='switchOffUser.C,colon'>关闭人：</@label></label> 
            	<input type="text" name="switchOffUser" value="${condition.switchOffUser!''}"/>
            </li>         
            <li>
            	<label><@label key='switchOffDateTime.C,from.C,colon'>关闭时间从：</@label></label>
            	<input type="text" class="date" dateFmt="yyyy-MM-dd HH:mm:ss" readonly="readonly" size="17"  max_Date="{maxSwitchOffDateTime}" name="minSwitchOffDateTime" value="${condition.minSwitchOffDateTime!''}"/>
            	<a class="inputDateButton" href="javascript:;">选择</a>
            </li>
            <li>
            	<label style="width: 120px;"><@label key="to.C,colon">至：</@label></label>
            	<input type="text" class="date" dateFmt="yyyy-MM-dd HH:mm:ss" readonly="readonly" size="17" min_Date="{minSwitchOffDateTime}" name="maxSwitchOffDateTime"  value="${condition.maxSwitchOffDateTime!''}"/>
            	<a class="inputDateButton" href="javascript:;">选择</a>
            </li>
        </ul>
        <ul class="searchContent">  
        	<li>
            	<label><@label key='respondUser.C,colon'>响应人：</@label></label> 
            	<input type="text" name="respondUser" value="${condition.respondUser!''}"/>
            </li>          
            <li>
            	<label><@label key='respondDateTime.C,from.C,colon'>响应时间从：</@label></label>
            	<input type="text" class="date" dateFmt="yyyy-MM-dd HH:mm:ss" readonly="readonly" size="17"  max_Date="{maxRespondDateTime}" name="minRespondDateTime" value="${condition.minRespondDateTime!''}"/>
            	<a class="inputDateButton" href="javascript:;">选择</a>
            </li>
            <li>
            	<label style="width: 120px;"><@label key="to.C,colon">至：</@label></label>
            	<input type="text" class="date" dateFmt="yyyy-MM-dd HH:mm:ss" readonly="readonly" size="17" min_Date="{minRespondDateTime}" name="maxRespondDateTime"  value="${condition.maxRespondDateTime!''}"/>
            	<a class="inputDateButton" href="javascript:;">选择</a>
            </li>
        </ul>
    </div>
</div>    
</form>

<div class="pageContent">
    <table class="table border" width="120%" layoutH="135">
        <thead>
            <tr>
                <th width="40"><@label key="serialNumber.C">序号</@label></th>
                <th width="40"><@label key="andonRunID.C">ID</@label></th>
                <th width="80"><@label key="workCenter.C">工作中心</@label></th>
                <th width="80"><@label key='workUnitCode.C'>作业单元：</@label></th>
                <th width="80"><@label key="andonCode.C">安灯编号</@label></th>
                <th width="80"><@label key="andonText.C">安灯描述</@label></th> 
                <th width="80"><@label key="andonType.C">安灯类型</@label></th>                
                <th width="100"><@label key='andonRunStatus.C'>ANDON运转状态</@label></th>
                <th width="80"><@label key='switchOnUser.C'>启动人</@label></th>
                <th width="140"><@label key='switchOnDateTime.C'>启动时间</@label></th>
                <th width="80"><@label key='switchOffUser.C'>关闭人</@label></th>
                <th width="140"><@label key='switchOffDateTime.C'>关闭时间</@label></th>
                <th width="80"><@label key='respondUser.C'>响应人</@label></th>
                <th width="140"><@label key='respondDateTime.C'>响应时间</@label></th>                
                <th width="80"><@label key='priority.C'>优先级</@label></th>
                <th width="80"><@label key='createUser.C'>创建人</@label></th>
                <th width="140" orderField="createDateTime"><@label key='createDateTime.C'>创建时间</@label></th>
                <th width="80"><@label key='modifyUser.C'>修改人</@label></th>
                <th width="140" orderField="modifyDateTime"><@label key='modifyDateTime.C'>修改时间</@label></th>
            </tr>
        </thead>
        <tbody>
        <#if page??><#if (page.data?size>0)> <#list page.data as andonRun>
            <tr target="andonRun_id" rel="${andonRun.id!''}">
                <td>${page.startRow + andonRun_index}</td>
                <td>${andonRun.id!''}</td>
                <td>${andonRun.workCenterCode!''}</td>
                <td>${andonRun.workUnitCode!''}</td>
                <td>${andonRun.andonCode!''}</td>
                <td>${andonRun.andonText!''}</td>
                <td>${andonRun.andonTypeCode!''}</td>
                
                <td><#if andonRunStatus??>
                    <#list andonRunStatus as ecode>
                        <#if andonRun.statusECode == ecode.eCode>${ecode.eCodeText!''}<#break></#if>
                    </#list>
                </#if>
                </td>                
                <td>${andonRun.switchOnUser!''}</td>
                <td>${(andonRun.switchOnDateTime?string("yyyy-MM-dd HH:mm:ss"))?if_exists}</td>
                <td>${andonRun.switchOffUser!''}</td>
                <td>${(andonRun.switchOffDateTime?string("yyyy-MM-dd HH:mm:ss"))?if_exists}</td>
                <td>${andonRun.respondUser!''}</td>
                <td>${(andonRun.respondDateTime?string("yyyy-MM-dd HH:mm:ss"))?if_exists}</td>
                <td>${andonRun.priority!''}</td>
                <td>${andonRun.createUser!''}</td>
                <td>${(andonRun.createDateTime?string("yyyy-MM-dd HH:mm:ss"))?if_exists}</td>
                <td>${andonRun.modifyUser!''}</td>
                <td>${(andonRun.modifyDateTime?string("yyyy-MM-dd HH:mm:ss"))?if_exists}</td>
            </tr>
        </#list>
        <#else>
        <tr target="andonRun_id">
                <td colspan="20" class="noData">======<@label key='noListData.C'>列表无数据</@label>=====</font></td>
        </tr>
        </#if>
        <#else>
        <tr target="andonRun_id">
                <td colspan="20" class="noData">======<@label key='noListData.C'>列表无数据</@label>=====</font></td>
        </tr>
        </#if>
        </tbody>
    </table>
    <#include "/common/panelBar.html">
</div>
<script type="text/javascript">
    $(function() {
        initAdvancedQuery(navTab.getCurrentPanel());        
    });
</script>